{template 'common/header'}
<ul class="nav nav-tabs">
    <li class="active"><a href="{php echo $this->createWebUrl('Resume');}">简历管理</a></li>
</ul>
    <div id="show_msg" style="display:none">操作成功</div>
    <div style="padding:15px;">
        <table class="table table-hover">
            <thead class="navbar-inner">
                <tr>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>年龄</th>
                    <th>手机</th>
                    <th>QQ</th>
                    <th>学历</th>
                    <th>专业</th>
                    <th>置顶</th>
                    <th>有效期</th>
                    <th>更新时间</th>
                     <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {loop $persons $row}
                <tr>
                    <td><small>{$row['username']}</small></td>
                    <td><small>{if $row['sex'] == 1}男{else}女{/if}</small></td>
                    <td><small>{$row['age']}</small></td>
                    <td><small>{$row['mobile']}</small></td>
                    <td><small>{$row['qq']}</small></td>
                    <td><small>{$config['educational'][$row['educational']]}</small></td>
                    <td><small>{$row['professional']}</small></td>
                    <td><small>
                    {if $row['istop'] == 0}
                    	<a class="btn btn-warning btn-xs" href='{php echo $this->createWebUrl("AuditResumeTopInfo", array("person_id" => $row[id]));}'>否</a>
                    {else}
                    	<a class="btn btn-success btn-xs" href="javascript:void(0);" onclick="change_resume_top_status({$row['id']}, 0)">是</a>
                    {/if}
                    </small></td>
                    <td><small>{if $row['expiration']} {php echo date('Y-m-d',$row['expiration'])} {else} —— {/if}</small></td>
                    <td><small>{php echo date('Y-m-d',$row['updatetime'])}</small></td>
                     <td><small>
                         <a class="btn btn-primary btn-xs" href='{php echo $this->createWebUrl("ResumeEdit", array("resumeid" => $row[id]));}'>编辑</a>
                         <a href="javascript:void(0);" onclick="delete_person_info({$row['id']})" title="删除" class="btn btn-danger btn-sm btn-xs">删除</a>
                     </small></td>
                </tr>
                {/loop}
            </tbody>
        </table>
    </div>
    
<script>
    /**
    *删除职位信息
    */
    function delete_person_info(id){
    	if(confirm('确定删除?')){
	    	$.post(
	    			'{php echo $this->createWebUrl("ResumeDeleteAjax");}',
	    	        {"personid":id},
	    	        function (data){
	    	        	location.reload();
	    	        }
	    	);
    	}
    }
    
    /**
    * 置顶
    */
    function change_resume_top_status(person_id, change_to){
    	$.post(
    			'{php echo $this->createWebUrl("AuditResumeTopInfoAjax")}',
    	        {"person_id":person_id, "change_to":change_to},
    	        function (data){
    	        	location.reload();
    	        }
    	);
    }
</script>
{template 'common/footer'}